package problems.daily.y2022m8;

/**
 * 1374. 生成每种字符都是奇数个的字符串
 * https://leetcode.cn/problems/generate-a-string-with-characters-that-have-odd-counts/
 * @author habitplus
 * @since 2022/8/1 7:05
 */
public class D20220801_1374 {

    public String generateTheString(int n) {
        // JDK8+, 0ms
        if (n < 1) return "";
        StringBuffer buffer = new StringBuffer();
        if (n % 2 != 0) {
//            return buffer.append("a".repeat(n)).toString();
        } else {
//            return buffer.append("a".repeat(n-1)).append("b").toString();
        }
        return "";
    }
}
